# -*- coding: utf-8 -*-

# To add a new cell, type '# %%'
# To add a new markdown cell, type '# %% [markdown]'


from jieba.analyse import *


with open('jingji.txt', 'r', encoding='UTF-8') as f:
    data = f.read()

for keyword, weight in extract_tags(data, withWeight=True):
    print('%s %s' % (keyword, weight))

for keyword, weight in textrank(data, withWeight=True):
    print('%s %s' % (keyword, weight))

